package com.relytosoft.mizar.analyze.common.feign;

import com.relytosoft.dubhe.common.core.object.ResponseResult;
import com.relytosoft.mizar.analyze.base.constant.MediaCommonConstants;
import com.relytosoft.mizar.analyze.common.config.StrategyFeignInterceptor;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @author Jierry
 * @version 2022/5/11.
 */
@FeignClient(contextId = "strategyFeignService", value = MediaCommonConstants.STRATEGY_SERVICE_NAME, fallbackFactory = StrategyFeignFallbackFactory.class, configuration = StrategyFeignInterceptor.class)
public interface StrategyFeignService {

    @GetMapping("strategy/face/test")
    ResponseResult test();

    /**
     * 结构化图片分析
     *
     * @param bodys
     * @return
     */
    @PostMapping(value = "strategy/structure/fearture/extraction", consumes = "application/json")
    ResponseResult struFeartureExtraction(@RequestBody String bodys);

    /**
     * 人脸分析
     *
     * @param bodys
     * @return
     */
    @PostMapping(value = "strategy/face/fearture/extraction", consumes = "application/json")
    ResponseResult faceFeartureExtraction(@RequestBody String bodys);

    /**
     * 人脸比对1:1
     *
     * @param bodys
     * @return
     */
    @PostMapping(value = "strategy/face/fearture/comparison", consumes = "application/json")
    ResponseResult faceFeartureComparison(@RequestBody String bodys);

    /**
     * 人脸检索
     *
     * @param bodys
     * @return
     */
    @PostMapping(value = "strategy/face/person/search", consumes = "application/json")
    ResponseResult faceSearch(@RequestBody String bodys);


}
